package com.service.dao.enums;

import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * <dl>
 * <dt>back-end</dt>
 * <dd>Description:</dd>
 * <dd>Copyright: Copyright (C) 2015</dd>
 * <dd>Company: </dd>
 * <dd>CreateDate: 2019年09月24日</dd>
 * </dl>
 *
 * @author
 */
public class HashRateOrderEnums {
    @AllArgsConstructor
    public enum ReleaseAwardStatus{
        RELEASE(1),
        NOT_RELEASE(2),
        ;

        @Getter
        private Integer code;
    }

    public enum Status {
        not_pay(0),
        payed(1),
        payed_effective(2),
        complete(3),
        noneffective(4);

        @Getter
        private Integer code;

        Status(Integer code) {
            this.code = code;
        }
    }
    @AllArgsConstructor
    public enum Source {

        RATE_MALL(1, "算力商城"),
        WEALTH_MANAGEMENT(2, "理财产品"),
        DYNAMIC_RATE_DR(31, "流动算力-直推"),
        DYNAMIC_RATE_IR(32, "流动算力-间推"),
        DYNAMIC_RATE_TEAM(33, "流动算力-团队"),
        BUY_OTHER_ORDER(4, "购买其他会员算力订单"),
        BUY_CONTRACT_ORDER(5, "期货算力"),
        LOCK_MINING_ORDER(6, "锁仓挖矿"),
        ;

        @Getter
        private Integer sourceCode;

        @Getter
        private String desc;

    }
    @AllArgsConstructor
    public enum Type {

        base(new ArrayList<>(Lists.newArrayList(Source.RATE_MALL.getSourceCode(), Source.BUY_OTHER_ORDER.getSourceCode()))),
        dynamic(new ArrayList<>(Lists.newArrayList(Source.DYNAMIC_RATE_DR.getSourceCode(),
                Source.DYNAMIC_RATE_IR.getSourceCode(), Source.DYNAMIC_RATE_TEAM.getSourceCode())));

        @Getter
        private List<Integer> sourceList;


    }

    public static List<Integer> getHrComboUsingStatus() {
        return Lists.newArrayList(Status.payed.getCode(), Status.payed_effective.getCode());
    }

    public static List<Integer> listEffectiveOrderSource() {
        return Lists.newArrayList(Source.RATE_MALL.getSourceCode()
                ,Source.BUY_CONTRACT_ORDER.getSourceCode());
    }

    public static List<Integer> getHrComboTotalStatus(){
        return Lists.newArrayList(Status.payed.getCode(),
                Status.payed_effective.getCode(),
                Status.complete.getCode());
    }

    public static List<Integer> getHrComboEffectiveStatus() {
        return Lists.newArrayList(Status.payed.getCode(), Status.payed_effective.getCode());
    }

    public static List<Integer> getHrComboPayedEffectiveStatus(){
        return Lists.newArrayList(Status.payed_effective.getCode());
    }
}
